<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of classDemo
 *
 * @author kumda
 */
class Demo {
    //put your code here
    private $_name;

    public function diHola(){
        print "Hola {$this->getName()}!";
    }

    public function getName(){
        return $this->_name;
    }

    public function setName($name){
        if (!is_string($name) || strlen($name)==0) {
            throw new Exception("Datos invalidos para el parametro nombre.",3);
        }
        $this->_name=$name;
        return true;
    }
}
?>